class Solution4 {
    public int hammingDistance(int x, int y) {
          int ret = x ^ y ;
          int sum = 0 ; 
          while(ret != 0){
            ret &= ret-1 ;
            sum ++ ;
          }
       return sum  ;
    }
}